paypal - Recurly.js Integration: How to override the subscription value? -
i trying achieve following:
?php require_once('recurly/lib/recurly.php'); // required api recurly_client::$subdomain = 'xxxxxx'; recurly_client::$apikey = 'xxxxxxxxxxxxxxxxxxx'; recurly_js::$privatekey = 'xxxxxxxxxxxxxxxxxxx'; $signature = recurly_js::sign( array( 'subscription' => array( 'plan_code' => 'testplan1', 'unit_amount_in_cents' => 5000, 'currency' => 'usd' ) ) ); ?> <html> <head> <link href="recurly-js/themes/default/recurly.css" rel="stylesheet"> <script src="js/jquery.js"></script> <script src="recurly-js/build/recurly.js"></script> <script> $(function(){ recurly.config({ subdomain: 'xxxxxxxxxx' , currency: 'usd' //usd | gbp | cad | eur, etc... , unit_amount_in_cents: '5000' }); /**/ recurly.buildsubscriptionform({ target: '#recurly-form' , plancode: 'testplan1' , successurl: 'success.php' , signature: '<?php echo $signature;?>' , unit_amount_in_cents: '5000' }); }); </script> </head> <body> <h1>test form</h1> <div id="recurly-form"></div> </body> </html>
when form rendered on front end, not reflect price given in sign object. displays original value of plan set in recurly plan.
is there doing wrong? or not possible override subscription value in sing function?
thanks, naresh
Comments
Post a Comment