Created
December 24, 2010 15:37
-
-
Save joshsmith/754344 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Return URL for validation and making pay requests | |
array | |
'signature' => string 'lyOR0dvgfv0nW36/LExYn58/J4FNZRqqkzXNwjezm80VTbTCjtRcbs0HNbTI/uhMTybjblnWn5Az | |
USaPYErzoazPP7CNAfjT4mKKzxRwUAukvRL70+tMyHiGwwM1O6mAW0/hM/RiTafSx8TzC5UIvKq1 | |
1H07ndhTp0m/7qETZ4w=' (length=174) | |
'expiry' => string '06/2016' (length=7) | |
'signatureVersion' => string '2' (length=1) | |
'signatureMethod' => string 'RSA-SHA1' (length=8) | |
'certificateUrl' => string 'https://fps.sandbox.amazonaws.com/certs/090910/PKICert.pem?requestId=bjzj1gs373exlu22707fizn2s4amuxfop7uczyf3j7z4zdjdo38' (length=120) | |
'tokenID' => string 'N12CGM7A6N8I9JEDNJJ77PUFTSPWXRI7LR7BM4J58KVNBQMU6BQKKX1UAJK4Y9HE' (length=64) | |
'status' => string 'SC' (length=2) | |
'callerReference' => string 'abc12345' (length=8) | |
*/ | |
$request = new Amazon_FPS_Model_PayRequest(); | |
// $senderTokenID is obtained from the Co-Branded service's return URL | |
$senderTokenId = "N12CGM7A6N8I9JEDNJJ77PUFTSPWXRI7LR7BM4J58KVNBQMU6BQKKX1UAJK4Y9HE"; | |
$request->setSenderTokenId($senderTokenId); | |
$request->setCallerReference("hellogoodbye"); | |
$amount = new Amazon_FPS_Model_Amount(); | |
$amount->setCurrencyCode("USD"); | |
$amount->setValue('1'); | |
$request->setTransactionAmount($amount); | |
$service = new Amazon_FPS_Client(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY); | |
invokePay($service, $request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment