News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Need Help On Amazon Flexible Payments Service Module For Virtuemart

Started by John, November 30, 2007, 20:39:16 PM

Previous topic - Next topic

John

Hi,I need help developing a basic Amazon Payments VirtueMart 1.0.12 payment module, my knowledge of PHP is limited & this is what I have now:



<formaction=" http://yourwebsite.com/confirmed"/>

  <input type="hidden"name="referenceId" value="<?php printf("%08d",$db->f("order_id")); ?>" />

  <input type="hidden"name="abandonUrl" value=" http://yourwebsite.com/cancel"/>

  <input type="image" src=" http://docs.amazonwebservices.com/AmazonFPS/2007-01-08/PayNowWidgetImplementationGuide/

<?
            #PHP Sample Code for creatinga 'Pay Now' widget
            #To use this sample, replacethe values of $accessKey and $secretKey with the values for youraccount
           
            require_once'Crypt/HMAC.php'; #see http://pear.php.net/package/Crypt_HMAC
            require_once'HTTP/Request.php'; #see http://pear.php.net/package/HTTP_Request
           
            $accessKey ="<insert-your-access-key-here>";
            $secretKey = "<insert-your-secret-key-here>";
           
            functiongetPayNowButtonForm($amount, $description, $referenceId,
            $immediateReturn, $returnUrl,$abandonUrl) {
            global $accessKey;
            $formHiddenInputs['accessKey'] = $accessKey;
            $formHiddenInputs['amount'] =$amount;
            $formHiddenInputs['description'] = $description;
            if ($referenceId)$formHiddenInputs['referenceId'] = $referenceId;       
            if ($immediateReturn)$formHiddenInputs['immediateReturn'] = $immediateReturn;   
            if ($returnUrl)$formHiddenInputs['returnUrl'] = $returnUrl;   
            if ($abandonUrl)$formHiddenInputs['abandonUrl'] = $abandonUrl;   
           
            ksort($formHiddenInputs);
            $stringToSign ="";
           
            foreach ($formHiddenInputs as$formHiddenInputName => $formHiddenInputValue) {
            $stringToSign = $stringToSign. $formHiddenInputName . $formHiddenInputValue;
            }
           
            $formHiddenInputs['signature'] = getSignature($stringToSign,$secretKey);
           
            $form = "<formaction=\" https://authorize.payments.amazon.com/pba/paypipeline\"method=\"post\">\n";
            foreach ($formHiddenInputs as$formHiddenInputName => $formHiddenInputValue) {
            $form = $form ."<input type=\"hidden\"name=\"$formHiddenInputName\"value=\"$formHiddenInputValue\" />\n";
            }
            $form = $form ."<input type=\"image\" src=\" https://authorize.payments.amazon.com/pba/images/amazonPaymentsButton.jpg\"border=\"0\" alt=\"Pay Using Amazon\"/>\n";
            $form = $form ."</form>\n";
            return $form;
            }
           
            functiongetSignature($stringToSign) {
            global $secretKey;
            $hmac = newCrypt_HMAC($secretKey,"sha1");
            $binary_hmac =pack("H40", $hmac->hash(trim($stringToSign)));
            returnbase64_encode($binary_hmac);
            }
          ?>
           
            <html>
              <body>
                <?=getPayNowButtonForm("USD1.00", "e-Card", "i123n", "1", " http://yourwebsite.com/return.html",
                  " http://yourwebsite.com/abandon.htm")?>
              </body>
            </html>



Pastedfrom < http://docs.amazonwebservices.com/AmazonFPS/2007-01-08/PayNowWidgetImplementationGuide/generatesig.html>


Sylvia

Ok, so Amazon is ready for payments....is VirtueMart????   :-\

https://payments.amazon.com/sdui/sdui/business?sn=cba/o

http://blogs.barrons.com/techtraderdaily/2008/07/29/amazon-takes-on-ebays-paypal-with-payments-service/

Might it be possible to use one of the other payment modules to copy & modify to be able to use Amazon? 

If so, could someone provide some guidance?

sylvia
[url=http://www.theboutiqueshoponline.com][/url]

2004carlt

I'd like to know if there's such a thing as a module that would do the same job. There seems to be a Google Checkout module but none for Amazon Payments.
[url="//www.alien-ufo-sightings.com"]www.alien-ufo-sightings.com[/url]
www.alien-ufo-videos.com
www.bestblender.co.uk
www.wealthyaffiliatesnoscam.blogspot.co.uk
www.grow-your-own-weed.blogspot.co.uk

scottpjr

Hi,

We have just completed an Amazon checkout module and have installed on a few of our clients sites and it works perfectly.

1 click install. This is not an extra module but will be located on the actual checkout page for the client. You just need to enter int your account information and the Amazon Checkout will appear.

You can see more info here:

http://usjoomlapros.com/Extensions/Amazon-CHeckout-For-Virtuemart/flypage.tpl.html

Or email me if you have any questions.

THX

Scott

kleinbaas

OK, so has anyone tried scott's extension? If so, does it work and does it work in Joonla 1.5 and VirtueMart 1.1.5 stable?

Scott, any way of trying it out before paying for it?

wipeout22

Is your website joomla 2.5 and virtuemart 2.

I did it on this site -  smartrestyle. I might beable to help you

send details of Joomla version and virtuemart

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
7x3:
Shortcuts: ALT+S post or ALT+P preview