This is where where it all begin when merchants receive online payments with yourpay. This is the function the consumers credit card data is first sent to, in order to complete a transaction. In order for the merchant to receive the payment from the consumer, a few parameters needs to be set. Please take a look at the code example here.
TIP You can open the file with notepad, if you do not have an editor for viewing source code.
When you run the code by uploading it to your server and navigate to the file, you will see the following input form:
If you are unsure how to fill in this form please look at the table below:
The request parameters are written in italic
|Merchant ID (merchantid)||The merchantid that the payment should go to.|
|Shop Platform (shopplatform)||The platform used to pay with yourpay.|
|Cardholder (cardholder)||Name of the credit card owner, written on the credit card.|
|CCV2 (cvc)||The three digit code on the back of the credit card|
|Expiry Year (expyear)||The expiration year of the credit card.|
|Expiry Month (expmonth)||The expiration month of the credit card.|
|Card number (cardno)||The sixteen digit card id.|
|Currency (currency)||ISO-4217 currency code that the payment should be paid in. For a full list of codes look here.|
|Amount (amount)||The amount to be charged on the consumers credit card in the subunit of the selected currency.|
|OrderID (orderid)||Your desired order id|
Activated with the value '1' and deactivated with the value '0'
If ccrg is turned on it will also be in the response. You need store that id from the response because you need it for rebilling, as it serves as our key to the customers saved credit card details.
When you submit you will get a JSON response with the following information:
|status||A status message, "ACK" on success & "NOK" if the payment failed.|
|tchecksum||SHA1 (PaymentID + integration code)|
|cardno||Hashed card number. The first six & the last four digits of the card are sent the rest is replaced with X|
|orderid||The order id you specified in the form request|
|ccrg||If ccrg was activated there will be an id here, otherwise null.|
|time||Unix timestamp of the moment the transaction was processed|
|chained||Will always be '0' unless you are using chained payments.|
|chained2||Will always be '0' unless you are using chained payments.|