Escrow API for Milestone Transactions payment via Wire transfer

  0 comments
Share

 

Wire transfers do not require the user to visit Escrow.com to complete payment. Paying via wire transfer is completed in two steps.

 

i) Retrieving wire transfer details - The first step is retrieving the bank account details and payment reference details.
This endpoint is used for returning the wire transfer details for funding an entire transaction.

 

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.escrow-sandbox.com/2017-09-01/transaction/1932733/payment_methods/wire_transfer', CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERPWD => 'client@drupalchamp.org:233_57fgvc5vIpiqwp6B8Z2986vc4dsfsdftwxHlgpEtOeE5gRPuyzw', //client email:api key(api key must be generated from broker account) CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ) )); $output = curl_exec($curl); echo $output; curl_close($curl); ?>

If the API call is successful, it will return the Escrow.com landing page that will allow the user to pay via PayPal

Example Response:-- { "bank_name": "Wells Fargo Bank, N.A", "bank_address": "420 Montgomery St, San Francisco, CA 94104", "routing_number": "121000248", "swift_code": "WFBIUS6S", "credit_account_name": "Internet Escrow Services Inc", "credit_account_number": "7101167844" }

ii) Marking a transaction as paid by wire transfer - This endpoint should be called after the wire transfer has been initiated.

 

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.escrow-sandbox.com/2017-09-01/transaction/1932733/payment_methods/wire_transfer', CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERPWD => 'client@drupalchamp.org:233_57fgvc5vIpiqwp6B8Z2986vc4dsfsdftwxHlgpEtOeE5gRPuyzw', //client email:api key(api key must be generated from broker account) CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), CURLOPT_CUSTOMREQUEST => 'POST' )); $output = curl_exec($curl); echo $output; curl_close($curl); ?>

Add new comment