Skip to content

Instantly share code, notes, and snippets.

@adiusz
Created July 25, 2023 13:01
Show Gist options
  • Save adiusz/8ea8623a2f36f759f212ab4a75291154 to your computer and use it in GitHub Desktop.
Save adiusz/8ea8623a2f36f759f212ab4a75291154 to your computer and use it in GitHub Desktop.
my payload:
{
is_demo: true,
intent: 'sale',
contract: { id: 'GCR_3HF0EBJ8CHXM67H76MJDMP99W02AOX' },
customer: {
contact: {
forename: 'acc1_adi',
surname: 'acc1_adi',
address: {
street: 'ajoptjp CORPO',
street_number: undefined,
postal_code: '8194',
city: 'city',
country: 'CL'
},
email: 'adam.leszczynsky@gmail.com'
}
},
basket: {
products: [
{
item_type: 'sub_transaction',
desc: '2704 Mint API test 1',
reference_id: 'nftID_1005 — listingID_1069 — userID_123 — acc1_adi — orderID_2590 — 5.829650583165766',
contract_id: 'GCR_6RDP7T7B49AKWK0S89J45GP9W083OH',
sum: 600,
sub_basket: [
{
id: 10051069110,
item_type: 'article',
quantity: 1,
desc: '2704 Mint API test 1',
priceOne: 600,
tax: 19,
reference_id: 'nftID_1005 — userID_123 — acc1_adi — orderID_2590 — 6.928935450649043'
},
{
item_type: 'stakeholder_payment',
desc: 'platform',
sum: 594,
contract_id: 'GCR_3HF0EBJ8CHXM67H76MJDMP99W02AOX',
reference_id: 'platform fee 0 — nftID_1005 — listingID_1069 — for GCR_3HF0EBJ8CHXM67H76MJDMP99W02AOX — userID_123 — acc1_adi — orderID_2590 — 7.50683652441849'
}
]
}
]
},
basket_info: { currency: 'EUR', sum: 600 },
transactionRef: 'Purchase of NFT#2590',
payment_context: { auto_capture: true, merchant_initiated: false },
application_context: {
language: 'en',
checkout_template: 'COT_WD0DE66HN2XWJHW8JM88003YG0NEA2',
return_urls: {
url_success: 'http://localhost:3000/profile/orders/2590?secupayPayment=success',
url_error: 'http://localhost:3000/profile/orders/2590?secupayPayment=error',
url_abort: 'http://localhost:3000/profile/orders/2590?secupayAbort=error'
}
}
}
your server response:
{
status: 'error',
error: 'ProductInternalException',
error_details: 'Internal error',
error_user: 'Es ist ein unbekannter Fehler aufgetreten',
code: 0,
supportId: '9a729f9af66e3cbf213df159af22cd1a'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment