Skip to content

Commit 29d5d70

Browse files
committed
[enh] Finish payment API (doc + transfer form) - fix #527
1 parent e970c46 commit 29d5d70

File tree

9 files changed

+297
-39
lines changed

9 files changed

+297
-39
lines changed

www/i18n/locale-en-GB.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,5 +763,64 @@
763763
"END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",
764764
"END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> below."
765765
}
766+
},
767+
"API" :{
768+
"COMMON": {
769+
"LINK_DOC": "API documentation",
770+
"LINK_DOC_HELP": "API documentation for developers"
771+
},
772+
"HOME": {
773+
"TITLE": "{{'COMMON.APP_NAME'|translate}} API Documentation",
774+
"MESSAGE": "Welcome to the {{'COMMON.APP_NAME'|translate}} <b>API documentation </b>.<br/>Connect your web site to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
775+
"MESSAGE_SHORT": "Connect your websites to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
776+
"DOC_HEADER": "Available services:"
777+
},
778+
"TRANSFER": {
779+
"TITLE": "{{'COMMON.APP_NAME'|translate}} - Online payment",
780+
"TITLE_SHORT": "Online payment",
781+
"SUMMARY": "Order summary:",
782+
"AMOUNT": "Amount:",
783+
"NAME": "Recipient:",
784+
"PUBKEY": "Public key of the recipient:",
785+
"COMMENT": "Order reference:",
786+
787+
"DEMO": {
788+
"SALT": "demo",
789+
"PASSWORD": "demo",
790+
"PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
791+
"HELP": "<b>Demonstration mode</b>: No payment will actually be sent during this simulation.<br/>Please use credentials: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
792+
"BAD_CREDENTIALS": "Invalid credentials.<br/>In demonstration mode, credentials should be: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
793+
},
794+
"INFO": {
795+
"SUCCESS_REDIRECTING_WITH_NAME": "Payment sent.<br/>Redirect to <b>{{name}}</b>...",
796+
"SUCCESS_REDIRECTING": "Payment sent.<br/>Redirect to the seller's website...",
797+
"CANCEL_REDIRECTING_WITH_NAME": "Payment cancelled.<br/>Redirect to <b>{{name}}</b>...",
798+
"CANCEL_REDIRECTING": "Payment cancelled.<br/>Redirect to the seller's website..."
799+
},
800+
"ERROR": {
801+
"TRANSFER_FAILED": "Payment failed"
802+
}
803+
},
804+
"DOC": {
805+
"BTN_DEMO": "Try",
806+
"DESCRIPTION_DIVIDER": "Description",
807+
"URL_DIVIDER": "Access URL",
808+
"PARAMETERS_DIVIDER": "Parameters",
809+
"AVAILABLE_PARAMETERS": "Here is the list of parameters and options:",
810+
"SUCCEED": "<i class=\"icon ion-checkmark\"></i> Success!",
811+
"CANCELLED": "<i class=\"icon ion-close\"></i> Canceled by user",
812+
"RESULT": "Result returned by call:",
813+
"TRANSFER": {
814+
"TITLE": "Payments",
815+
"DESCRIPTION": "From a site (eg online marketplace) you can delegate payment in free currency to Cesium API. To do this, simply open a page at the following address:",
816+
"PARAM_PUBKEY_HELP": "Recipient's public key (required)",
817+
"PARAM_AMOUNT": "Amount",
818+
"PARAM_AMOUNT_HELP": "Transaction amount (required)",
819+
"PARAM_COMMENT_HELP": "Reference or comment. You will allow for example to identify the payment in the BlockChain.",
820+
"PARAM_NAME_HELP": "The name of your website. This can be a readable name (eg \"My online site\"), or a web address (eg \"www.MySite.com\").",
821+
"PARAM_REDIRECT_URL_HELP": "Redirect URL. Can contain the following strings, which will be replaced by the values of the transaction: \"{tx}\", \"{hash}\", \"{comment}\" and \"{amount}\".",
822+
"PARAM_CANCEL_URL_HELP": "URL in case of cancellation"
823+
}
824+
}
766825
}
767826
}

www/i18n/locale-en.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,5 +763,64 @@
763763
"END_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>Welcome to the <b>free economy</b>!",
764764
"END_NOT_LOGIN": "This guided visit has <b>ended</b>.<br/><br/>If you wish to join the currency {{currency|capitalize}}, simply click <b>{{'LOGIN.CREATE_ACCOUNT'|translate}}</b> below."
765765
}
766+
},
767+
"API" :{
768+
"COMMON": {
769+
"LINK_DOC": "API documentation",
770+
"LINK_DOC_HELP": "API documentation for developers"
771+
},
772+
"HOME": {
773+
"TITLE": "{{'COMMON.APP_NAME'|translate}} API Documentation",
774+
"MESSAGE": "Welcome to the {{'COMMON.APP_NAME'|translate}} <b>API documentation </b>.<br/>Connect your web site to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
775+
"MESSAGE_SHORT": "Connect your websites to <a href=\"http://duniter.org\" target=\"_system\">Duniter</a> very easily!",
776+
"DOC_HEADER": "Available services:"
777+
},
778+
"TRANSFER": {
779+
"TITLE": "{{'COMMON.APP_NAME'|translate}} - Online payment",
780+
"TITLE_SHORT": "Online payment",
781+
"SUMMARY": "Order summary:",
782+
"AMOUNT": "Amount:",
783+
"NAME": "Recipient:",
784+
"PUBKEY": "Public key of the recipient:",
785+
"COMMENT": "Order reference:",
786+
787+
"DEMO": {
788+
"SALT": "demo",
789+
"PASSWORD": "demo",
790+
"PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
791+
"HELP": "<b>Demonstration mode</b>: No payment will actually be sent during this simulation.<br/>Please use credentials: <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
792+
"BAD_CREDENTIALS": "Invalid credentials.<br/>In demonstration mode, credentials should be: {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
793+
},
794+
"INFO": {
795+
"SUCCESS_REDIRECTING_WITH_NAME": "Payment sent.<br/>Redirect to <b>{{name}}</b>...",
796+
"SUCCESS_REDIRECTING": "Payment sent.<br/>Redirect to the seller's website...",
797+
"CANCEL_REDIRECTING_WITH_NAME": "Payment cancelled.<br/>Redirect to <b>{{name}}</b>...",
798+
"CANCEL_REDIRECTING": "Payment cancelled.<br/>Redirect to the seller's website..."
799+
},
800+
"ERROR": {
801+
"TRANSFER_FAILED": "Payment failed"
802+
}
803+
},
804+
"DOC": {
805+
"BTN_DEMO": "Try",
806+
"DESCRIPTION_DIVIDER": "Description",
807+
"URL_DIVIDER": "Access URL",
808+
"PARAMETERS_DIVIDER": "Parameters",
809+
"AVAILABLE_PARAMETERS": "Here is the list of parameters and options:",
810+
"SUCCEED": "<i class=\"icon ion-checkmark\"></i> Success!",
811+
"CANCELLED": "<i class=\"icon ion-close\"></i> Canceled by user",
812+
"RESULT": "Result returned by call:",
813+
"TRANSFER": {
814+
"TITLE": "Payments",
815+
"DESCRIPTION": "From a site (eg online marketplace) you can delegate payment in free currency to Cesium API. To do this, simply open a page at the following address:",
816+
"PARAM_PUBKEY_HELP": "Recipient's public key (required)",
817+
"PARAM_AMOUNT": "Amount",
818+
"PARAM_AMOUNT_HELP": "Transaction amount (required)",
819+
"PARAM_COMMENT_HELP": "Reference or comment. You will allow for example to identify the payment in the BlockChain.",
820+
"PARAM_NAME_HELP": "The name of your website. This can be a readable name (eg \"My online site\"), or a web address (eg \"www.MySite.com\").",
821+
"PARAM_REDIRECT_URL_HELP": "Redirect URL. Can contain the following strings, which will be replaced by the values of the transaction: \"{tx}\", \"{hash}\", \"{comment}\" and \"{amount}\".",
822+
"PARAM_CANCEL_URL_HELP": "URL in case of cancellation"
823+
}
824+
}
766825
}
767826
}

www/i18n/locale-fr-FR.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,20 @@
783783
"NAME": "Destinataire :",
784784
"PUBKEY": "Clé publique du destinaire :",
785785
"COMMENT": "Référence de la commande :",
786+
787+
"DEMO": {
788+
"SALT": "demo",
789+
"PASSWORD": "demo",
790+
"PUBKEY": "3G28bL6deXQBYpPBpLFuECo46d3kfYMJwst7uhdVBnD1",
791+
"HELP": "<b>Mode démonstration</b> : Aucun paiement ne sera réellement envoyé pendant cette simulation.<br/>Veuillez utiliser les identifiants : <b>{{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}</b>",
792+
"BAD_CREDENTIALS": "Vérifiez votre saisie.<br/>En mode démonstration, les identifiants sont : {{'API.TRANSFER.DEMO.SALT'|translate}} / {{'API.TRANSFER.DEMO.PASSWORD'|translate}}"
793+
},
794+
"INFO": {
795+
"SUCCESS_REDIRECTING_WITH_NAME": "Paiement envoyé.<br/>Redirection vers <b>{{name}}</b>...",
796+
"SUCCESS_REDIRECTING": "Paiement envoyé.<br/>Redirection vers le site du vendeur...",
797+
"CANCEL_REDIRECTING_WITH_NAME": "Paiement annulé.<br/>Redirection vers <b>{{name}}</b>...",
798+
"CANCEL_REDIRECTING": "Paiement annulé.<br/>Redirection vers le site du vendeur..."
799+
},
786800
"ERROR": {
787801
"TRANSFER_FAILED": "Echec du paiement"
788802
}
@@ -791,19 +805,20 @@
791805
"BTN_DEMO": "Démo",
792806
"DESCRIPTION_DIVIDER": "Description",
793807
"URL_DIVIDER": "URL d'accès",
794-
"PARAMETERS_DIVIDER": "Options",
795-
"AVAILABLE_PARAMETERS": "Voici la liste des options possibles :",
808+
"PARAMETERS_DIVIDER": "Paramètres",
809+
"AVAILABLE_PARAMETERS": "Voici la liste des paramètres et options :",
796810
"SUCCEED": "<i class=\"icon ion-checkmark\"></i> Succès !",
797811
"CANCELLED": "<i class=\"icon ion-close\"></i> Annulé par l'utilisateur",
798812
"RESULT": "Résultat retourné par l'appel :",
799813
"TRANSFER": {
800814
"TITLE": "Paiements",
801815
"DESCRIPTION": "Depuis un site (ex: vente en ligne) vous pouvez déléguer le paiement en monnaie libre à Cesium API. Pour cela, il vous suffit de déclencher l'ouveture d'un page sur l'adresse suivante :",
816+
"PARAM_PUBKEY_HELP": "Clé publique du destinataire (obligatoire)",
802817
"PARAM_AMOUNT": "Montant",
803818
"PARAM_AMOUNT_HELP": "Montant de la transaction (obligatoire)",
804819
"PARAM_COMMENT_HELP": "Référence ou commentaire. Vous permettra par exemple d'identifier le paiement dans la BlockChain.",
805-
"PARAM_NAME_HELP": "Le nom de votre site. Cela peut-etre un nom lisible (\"Mon site en ligne\"), ou encore une pseudo-adresse web (\"MonSite.com\").",
806-
"PARAM_REDIRECT_URL_HELP": "URL de redirection",
820+
"PARAM_NAME_HELP": "Le nom de votre site web. Cela peut-etre un nom lisible (\"Mon site en ligne\"), ou encore une pseudo-adresse web (\"MonSite.com\").",
821+
"PARAM_REDIRECT_URL_HELP": "URL de redirection. Peut contenir les chaines suivantes, qui seront remplacée par les valeurs de la transaction : \"{tx}\", \"{hash}\", \"{comment}\" et \"{amount}\".",
807822
"PARAM_CANCEL_URL_HELP": "URL en cas d'annulation"
808823
}
809824
}

0 commit comments

Comments
 (0)