Thanks @phill.dev , much appreciated!!
Responses in line with the above as follows:
- Sorry, yes well spotted. I was trying the first visa test values which must be US. The EU test cards (and my own) work fine.
- Thanks, all sorted.
- Thanks.
- I’ll add more detail and screenshots to the correct plugin page (I’m currently evaluating web checkout link vs card SDK)
- Sorry, I’m not sure how to do this with the plugin. The plugin makes the necessary API call to submit the request to Square but how do I capture the response, parse it and then use it navigate the user to the next screen? You’re correct in that I want to pull out Status from the response (but also Order ID and Receipt URL) but I don’t know how. Could you advise please? Request and response details below.
Request:
{
"source_id": "[redacted]",
"idempotency_key": "2d3q9wbcwzo64t2y3iharr",
"amount_money": {
"amount": 500,
"currency": "GBP"
},
"app_fee_money": {
"amount": 2,
"currency": "GBP"
},
"autocomplete": true,
"location_id": "LE7DZEDK4XTMQ",
"verification_token": "verf:CBASEA7kb3jC3mI_q_YZsMnZN0s",
"statement_description_identifier": "Tipz"
Response
{
"payment": {
"id": "vRlGJQrGG9DmY7Sq26ZdU10c14fZY",
"created_at": "2022-07-23T12:14:43.757Z",
"updated_at": "2022-07-23T12:14:43.988Z",
"amount_money": {
"amount": 500,
"currency": "GBP"
},
"total_money": {
"amount": 500,
"currency": "GBP"
},
"app_fee_money": {
"amount": 2,
"currency": "GBP"
},
"approved_money": {
"amount": 500,
"currency": "GBP"
},
"status": "COMPLETED",
"delay_duration": "PT168H",
"delay_action": "CANCEL",
"delayed_until": "2022-07-30T12:14:43.757Z",
"source_type": "CARD",
"card_details": {
"status": "CAPTURED",
"card": {
"card_brand": "VISA",
"last_4": "1111",
"exp_month": 11,
"exp_year": 2022,
"fingerprint": "sq-1-zLlRG7bHnmpdyDIsi5iZn0p9g31eF0v88YFfsppNXdWzPr_wmZ4xN-P5pG2svVNTVQ",
"card_type": "CREDIT",
"prepaid_type": "NOT_PREPAID",
"bin": "411111"
},
"entry_method": "KEYED",
"cvv_status": "CVV_ACCEPTED",
"avs_status": "AVS_ACCEPTED",
"statement_description": "SQ *DEFAULT TEST ACCOUNT",
"card_payment_timeline": {
"authorized_at": "2022-07-23T12:14:43.866Z",
"captured_at": "2022-07-23T12:14:43.989Z"
}
},
"location_id": "LE7DZEDK4XTMQ",
"order_id": "PcAYviBk4ZF03liIOx0Du5x8oUFZY",
"statement_description_identifier": "Tipz",
"receipt_number": "vRlG",
"receipt_url": "https://squareupsandbox.com/receipt/preview/vRlGJQrGG9DmY7Sq26ZdU10c14fZY",
"application_details": {
"square_product": "ECOMMERCE_API",
"application_id": "xxx"
},
"version_token": "Lh7gCGoMTNBgv4KeB9NTQnnWPIC0v6bZLTZbwCGiqOv6o"
}
}