Testing your Integration
...
Testing your Wallet Payment In...
Testing Digital Wallet Payments - via Web SDK
testing digital wallet payments via web sdk make sure you are using web sdk version 0 0 18 (or higher) decline scenarios for wallet payments cannot be tested in the sandbox environment testing card payments for your digital wallet payments via judopay's web sdk integration apple pay™ prerequisites from the web sdk integration guide web sdk docid 40dwe6lbub7vdkza1qydc web sdk docid 40dwe6lbub7vdkza1qydc to hide the payment form iframe, use \<div id="payment iframe" style="position\ absolute;width 0;height 0;border 0;">\</div> the payment form iframe must be loaded onto the page in order for payments to work however displaying the form to the consumer is not required for this transaction type web sdk docid 40dwe6lbub7vdkza1qydc web sdk docid 40dwe6lbub7vdkza1qydc web sdk docid 40dwe6lbub7vdkza1qydc direct from judopay judopay judoid a valid apple developer merchantid domain association get it web sdk docid 40dwe6lbub7vdkza1qydc from the merchant domain(s) being used for apple pay™ these are the domain(s) where the apple pay™ button will be displayed, for example the checkout page these must be ssl enabled domains, apple will not allow non encrypted domains to be used account(s) being used for apple pay™ for a successful end to end wallet payment testing journey, it is recommended to perform wallet test scenarios in a production environment use live cards to process test payments and preauths google pay™ prerequisites from the web sdk integration guide web sdk docid 40dwe6lbub7vdkza1qydc web sdk docid 40dwe6lbub7vdkza1qydc to hide the payment form iframe, use \<div id="payment iframe" style="position\ absolute;width 0;height 0;border 0;">\</div> the payment form iframe must be loaded onto the page in order for payments to work however displaying the form to the consumer is not required for this transaction type web sdk docid 40dwe6lbub7vdkza1qydc direct from judopay judopay account (sandbox and eventually live) judopay judoid merchant requirement (google requirement) prior to going live with google pay™ web payments, you must have a valid google verified live merchant id to receive your live merchant id follow google pay™'s integration checklist, to ensure you have completed all the required steps in your integration begin the process to obtain production access from google, here to add your test card suite to your digital wallet to process test payments and preauths, register your google pay wallet details for the cards in your test card suite are hard coded into the test wallet, therefore some negative scenarios cannot be simulated, due to limitations to google pay™s test environment for example you cannot simulate an incorrect cv2, or insufficient funds you will only receive a success response no charge will be made on the test cards wallet payment scenarios (positive flow) the digital wallet payment flow provides consumers with an extra layer of security, encrypting and decrypting the card details sent in the payload by replacing the consumer's card details with a device token, or dynamic security code apple pay™ and google pay™ scenarios true false 414false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type for more information on api credentials and permissions, see introduction docid\ s 8hoamytkgy13t0p657 calling the web sdk functions apple pay™ configuration object parameters paymentrequestapplepay true false 286false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type google pay™ configuration object parameters paymentrequestgooglepay true false 286false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type apple pay request example //4 called when the apple pay button is clicked function handleapplepaybuttonclick() { let applepayconfiguration = { amount 'amount', currency 'currency', yourconsumerreference 'yourconsumerreference', yourpaymentreference 'yourpaymentreference', judoid 'judoid', initiativecontext 'yourdomainname' } //trigger websdk apple pay payment with apple pay configuration object judo digitalwallets invokepaymentwithapplepay(paymentsession, configuration) then(handlesuccess) // judopay receipt object will be returned catch(handleerror) // judopay error object will be returned } //1 create apple pay button with styling object var button = judo digitalwallets getapplepaybutton({ height 38, width 240, language 'en', style 'black', type 'buy'}); //2 set the function to be called when the apple pay button is clicked button onclick = handleapplepaybuttonclick //3 add the apple pay button to your page const container = document getelementbyid('apple pay button container') container append(button) google pay request example const googlepayconfiguration = { judoid "yourjudoid", amount "12 99", currency "gbp", yourpaymentreference "yourpaymentreferenc", yourconsumerreference "yourconsumerreference", paymentsession "yourpaymentsession", environment "test", transactionmode "payment", buttonstyle { type "buy", sizemode "static", locale "en", width "200", height "36" } paymentrequest = { merchantinfo { merchantid 'yourmerchantid' //issued after registration }, allowedpaymentmethods \[{ parameters { allowedcardnetworks \['visa', 'mastercard', 'amex'] } }], transactioninfo { totalpricestatus 'final', totalprice '1 0', currencycode 'gbp', countrycode 'gb' } } onsuccess handlesuccess, // judopay receipt object will be returned onerror handleerror // judopay error object will be returned } //1 initialize google pay button with google pay configuration object (includes logic to trigger the payment when clicked) const button = judo digitalwallets getgooglepaybutton(googlepayconfiguration) //2 add the google pay button to your page const container = document getelementbyid('google pay button container') container append(button) response example (judopay receipt object) { "receiptid" "914568453493526528", "yourpaymentreference" "34a73594 f3b2 414c a5c9 58679530b418", "type" "payment", "result" "success", "judoid" 100502814, "originalamount" "5 00", "netamount" "5 00", "amount" "5 00", "currency" "gbp", "carddetails" { "cardlastfour" "1111", "enddate" "1222", "cardtoken" "sof xfmzmenor sj9mtrcvrxhw", "cardtype" 1, "cardscheme" "visa", "cardfunding" "credit", "cardcategory" "", "cardcountry" "us", "bank" "jpmorgan chase bank, n a " }, "cardaddress" { "address1" "cardholder house", "address2" "1 cardholder street", "town" "cardholder town", "postcode" "ab1 2cd", "countrycode" 826 }, "consumer" { "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", }, } once the authorisation is complete you will receive either a json object response (a judopay receipt object) example in the code snippet above an error object the consumer should be redirected to the outcome screen and the response/error should be handled accordingly for example, if the result = success redirect the consumer to the success page, else error for more information on the response codes, see codes and descriptions docid zrsihomuew xnrq4pbtj wallet payment scenarios (negative flow) decline scenarios for wallet payments cannot be tested in the sandbox environment important to consider how your app handles negative flows your customer's experience should a negative flow occur logic to communicate error messages customise how your app responds how to maintain application consistency limited test coverage is possible in the sandbox environment the suggested negative test scenarios refer to model and processing error codes and information on why the transaction request failed judopay's validation checks, which are similar to card payment scenarios true false 278,101false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type where the codes remain fixed, the descriptions may change you should not build any error handling logic based on these descriptions for more information on error responses returned, see web sdk docid 40dwe6lbub7vdkza1qydc next steps using the response information from a successful wallet payment test transaction, you can test the following scenarios directly call the transaction api to make a testing collections docid\ yvjgzt2gxwbdxm3m0wemu testing refunds docid\ mebkvlfmxdp3kolys0uda testing voids docid\ dmbakskjll551suxqipum