Hey guys, I’m having some issues with API’s. I am trying to send URLs to an API link, so when payment is completed with my payment processor, the user is redirected to my app.
Here is the API URL: https://prod.yottapay.co.uk/launcher/shop/paymentgateway/new
Here is the JSON which needs to be updated with my own redirect URLS:
curl --location --request POST ‘https://prod.yottapay.co.uk/launcher/shop/paymentgateway/new’ --header ‘Content-Type: application/json’ --data-raw ‘{
“type”: “creation”,
“shop_transaction_identifier”: “ORD-1337”,
“merchant_identifier”: “29e5c8d8-888e-4594-96da-260970d64279”,
“amount”: “20”,
“order_reference”: “Fee”,
“url_payment_result”: “https://nowhere”,
“url_merchant_page_success”: “https://google.com”,
“url_merchant_page_cancel”: “https://google.com”,
“signature”: “f6208e4f01436064579cd4e15f1d724d8ab9fa03beb6ae9037f8d9465fc514f6”
}’
Here is a message from the payment processor’s developers.
And here is the link to their API docs:
I understand that I have the info I need, but where do I apply this in Adalo? I tried creating a CREATE-POST custom action with all of the info, but it is not redirecting and the custom action on the ‘pay now’ button within my app is just spinning.
Anyone have advice on what to do? Thanks in advance!
I will paste some other advice messages from the developers below:
laime🦛 wow, [13/12/2022 12:51]
in your case you can simply use hard-coded payment request url on server side that will return your customer back to your application using custom scheme url
egg, [13/12/2022 12:51]
Can you point me in the direction of where to use this?
laime🦛 wow, [13/12/2022 12:52]
using a single static payment request looks like an easy way but it’s not correct way to do this
laime🦛 wow, [13/12/2022 12:53]
you should call an Create a new order request. on the right side of the page you can see an example of request body. in reply you will get the payment link that should be returned to the customer
laime🦛 wow, [13/12/2022 12:53]
once paid by this link, customer will be redirected to url_merchant_page_success
egg wareing, [13/12/2022 12:56]
I use Adalo for most of the API’s used in the app. What system are you referring to that will show the reply on the right side of the page?
laime🦛 wow, [13/12/2022 12:57]
I mean it’s literally right side of the our doc’s page
egg, [13/12/2022 12:59]
I see, I’m still a little confused. Do you mind sending a few screenshots of the process, just so I know I’m following correctly?
laime🦛 wow, [13/12/2022 13:03]
the easiest way to create a payment request is just an hard-coded request like
curl --location --request POST ‘https://prod.yottapay.co.uk/launcher/shop/paymentgateway/new’ --header ‘Content-Type: application/json’ --data-raw ‘{
“type”: “creation”,
“shop_transaction_identifier”: “ORD-1337”,
“merchant_identifier”: “<YOUR_MERCHANT_ID>”,
“amount”: “20”,
“order_reference”: “Your fee reference”,
“url_payment_result”: “https://yourapp.com/result”,
“url_merchant_page_success”: “yourschema://success”,
“url_merchant_page_cancel”: “yourschema://success”,
“signature”: “SIGNATURE”
}’
laime🦛 wow, [13/12/2022 13:04]
its a POST to the https://prod.yottapay.co.uk/launcher/shop/paymentgateway/new
laime🦛 wow, [13/12/2022 13:15]
yep you can just hard-code it like this
laime🦛 wow, [13/12/2022 13:16]
yes. and shop transaction identitfier, and reference, and signature, and merchant id
laime🦛 wow, [13/12/2022 13:27]
ok for test use this body:
laime🦛 wow, [13/12/2022 13:27]
curl --location --request POST ‘https://prod.yottapay.co.uk/launcher/shop/paymentgateway/new’ --header ‘Content-Type: application/json’ --data-raw ‘{
“type”: “creation”,
“shop_transaction_identifier”: “ORD-1337”,
“merchant_identifier”: “29e5c8d8-888e-4594-96da-260970d64279”,
“amount”: “20”,
“order_reference”: “Fee”,
“url_payment_result”: “https://nowhere”,
“url_merchant_page_success”: “https://google.com”,
“url_merchant_page_cancel”: “https://google.com”,
“signature”: “f6208e4f01436064579cd4e15f1d724d8ab9fa03beb6ae9037f8d9465fc514f6”
}’
laime🦛 wow, [13/12/2022 13:27]
it will return to google.com after success payment
laime🦛 wow, [13/12/2022 13:28]
when you will be ready to handle redirect back to your app, message me and we will deal with it