Purpose
This method is used by myPOS Checkout API to notify the merchant of a successful payment and to pass all needed parameters for the payment on URL_Notify. After a successful response for this method, myPOS Checkout will redirect the customer browser to URL_OK and will pass the same parameters with the IPCPurchaseOK method.
Do not use IPCPurchaseOK to authorize a payment because it is not a server-to-server connection and it is not always guaranteed to receive a response. In this case, you should use IPCPurchaseNotify.
Method Properties
Property |
Typical value |
Type |
Description |
---|---|---|---|
Amount |
23.45 |
Double |
Conditional. Echo from IPCPurchase. |
Currency |
EUR |
A(3) |
Echo from IPCPurchase. |
OrderID |
201203319999999 |
string |
Echo from IPCPurchase. |
IPC_Trnref |
12345678923 |
String |
Used to uniquely identify a transaction in IPC. Used as a parameter for a subsequent refund of reversal if needed. |
RequestDateTime |
2012-03-31 23:59:59 |
DateTime |
Date/time of the request |
RequestSTAN |
123456 |
N(6) |
Consequent number from 1 to 999999. Used for request unique match. |
CardToken |
Byte[] |
BASE64 |
Conditional. The CardToken is returned when the card is stored (depending on the chosen option in CardTokenRequest). |
PAN |
4885 |
N(4) |
Conditional. Last four digits of the account number (PAN). The PAN is returned when the card is stored (depending on the chosen option in CardTokenRequest). |
ExpDate |
1703 |
N(4) |
Conditional. The ExpDate is returned when the card is stored (depending on the chosen option in CardTokenRequest). |
CardType |
1 |
N(1) |
Conditional. The CardType is returned when the card is stored (depending on the chosen option in CardTokenRequest). |
CustomerEmail |
String |
Conditional. When PaymentParametersRequired = 1; 2 |
|
CustomerPhone |
+23568956958 |
String |
Conditional. When PaymentParametersRequired = 1; 2 |
CustomerFirstNames |
John Santamaria |
String |
Conditional. When PaymentParametersRequired = 1; 2 |
CustomerFamilyName |
Smith |
String |
Conditional. When PaymentParametersRequired = 1; 2 |
BillingDescriptor |
MYPOS *BillingDescriptor |
String |
Identifying text that appears on a customer's credit or debit card statement. Can be changed from your account (Stores -> eCommerce -> Settings). |
Signature |
Byte[] |
BASE64 |
SHA-256 HASH for all properties in the command. Signature is ALWAYS THE LAST PARAMETER IN THE POST, as it is not used to calculate the hash. |
The IPCGetTxnStatus call will return the parameters of the response.
Upon HTTP request, the party should respond with header HTTP 200 OK with the following body content: “OK”. Every other response will be treated as a communication error, call error, server error or system malfunctions.
Example
HTTP/1.1 200 OK
Date: Mon, 11 Mar 2013 08:04:50 GMT
Server: Apache/2.2.22 (Win32) PHP/5.2.17
X-Powered-By: PHP/5.2.17
Set-Cookie: PHPSESSID=a048e995f78f9e38b192f528f67d3cc3; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 2
Connection: close
Content-Type: text/html; charset=utf-8
OK
HTTP POST
Data transfer between Merchant and myPOS Checkout is made by HTTP POST. All the parameters for the requests are in the body in [parameter=value] form. The separator between tokens is [&]. The body is URL Encoded. Character encoding is UTF-8.
Example
POST /somescript.php HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/4.0
Content-Length: 39
Content-Type: application/x-www-form-urlencoded
userid=joe&password=guessme&user_type=1
Result POST Data
Array (
[IPCmethod] => IPCPurchaseNotify
[SID] => 000000000000010
[Amount] => 50
[Currency] => EUR
[OrderID] => 1440146333
[IPC_Trnref] => 813705
[RequestSTAN] => 000006
[RequestDateTime] => 2015-08-21 10:39:37
[Signature] => aPn96fYghN/hdLgP0oGbCglBACwJlG6TSlf7UJP9Qe9UMzBP9+B5r7enaLZNAWAHaws7iZH9INgQrHbnn/IaIKFYzjWLHqCQm2xYPF4IAbIn5MC9UjfUXyMxZ42ENVx/Poeq0ZH1Zd34j2qbFJ8tViawUjey5BZRIeJaEmQr3ww=
);