TOCACoffee Posted January 22, 2019 Share Posted January 22, 2019 You may have seen our other post here about how to add XRP as a new payment gateway on Shopify. Now we have a solution to automatically sync any payments received to your XRP wallet with your Shopify account! Login to Shopify and on the left hand side select Apps: At the bottom of the page click the Manage private apps link: At the top right hand corner of the next page click Create a new private app: Fill out the following form and you can set everything to No access except for Orders, transactions and fulfillments which needs to be Read and write, then click Save at the top: You will be prompted with a confirmation screen confirming the sensitivity of the credentials you are about to generate and not to share them with anyone: On the following page you will be presented with your API credentials: Open the XRP-Shopify Payment Sync Access Database and enter in your API Key, API Password, Shopify Store Name and XRP Wallet Address. The USD Issuer Exchange is used during the exchange rate process to identify the proper XRP/USD exchange rate via the Ripple APIs, it is currently set to use Bitstamp. Allowable Difference is the USD amount you are willing to accept as a difference between what the customer sends to you in XRP and what it converts to in USD. If the USD amount received is higher than the total order price, the program will simply mark the order as paid in full. (You can either check your wallet or view the processed orders via the Processed Orders button to confirm dollar amounts.) If the USD amount received is less than the total order price but is within your allowable difference amount (which should be set as a negative), then the program will mark the order as paid in full. If the USD amount received is less than the total order price and is not within the allowable difference amount, then the program will mark the order partially paid and update it accordingly in Shopify. The program will run every 5 minutes once you click Run, and the button will change to Stop upon clicking. You can leave it running in the background should you so desire. The program will connect to Shopify, obtain any orders that were processed using the gateway name XRP and that are pending payment. The program then connects to your XRP wallet and downloads the last 50 transactions. It then obtains the current exchange rates and calculates the difference between USD and XRP. A query matches any orders from Shopify to your XRP wallet based on the destination tag. Next based on the matching orders and calculations it will update Shopify accordingly either marking it as paid or partially paid. Last it will save all the processed orders to a table which can be accessed via the Processed Orders button. In the background this uses: A curl command line executable (should be in the same directory as this database) VBA-JSON available from https://github.com/VBA-tools/VBA-JSON ShellWait by Terry Kreft I have uploaded everything to GitHub and it is accessible at https://github.com/TOCACoffee/XRP_Shopify_Payment_Sync I tried to make it so that even if you do not have Access, you could download the MS Access Run Time from Microsoft and still run the database to get the job done. However I am attaching the full database that you are free to modify for your own needs. Our hope is that this will help more people start offering XRP as a payment option which will help increase awareness, usage, and price!! If this tutorial has helped you and you'd like to donate ( rTocauxk75yWyEhwo5QxHGwytweG7JXYD ) or if you'd like to experience some amazing coffee from our tocacoffee.com website, use code XRPChat and save 35% on your purchase! In conjunction with this post we are also launching a new blend available via this link called Moon Lambo: Description: When Moon? When Lambo? Now! No FOMO or FUD here and your ROI is immediate with this blend of the best the blockchain has to offer. Resist the urge to HODL these top Americas, Asia and Africa coffees and enjoy. Medium Roast Xrphunter 1 Link to comment Share on other sites More sharing options...
TOCACoffee Posted January 23, 2019 Author Share Posted January 23, 2019 Cancel Feature Added Since customers may select XRP and not pay, we don't want to have pending orders just sitting in the Shopify queue. We entered a cancel time field on the menu and after, for example, 15 minutes has passed since the order was entered, the program will automatically cancel the order and send notification to the customer that the order has been canceled. This change has been added to GitHub at https://github.com/TOCACoffee/XRP_Shopify_Payment_Sync If you don't wan't this feature, simply download the original version from GitHub. Dario_o 1 Link to comment Share on other sites More sharing options...
TOCACoffee Posted January 25, 2019 Author Share Posted January 25, 2019 Just updated the cancel feature to first void the transaction and then cancel the order. Also if you are interested in changing the email the customer receives after canceling an order for non-payment within Shopify, go to Settings then Notifications and click Order canceled, then enter the following text where highlighted below: {% when 'declined' %} {% if order.transactions[0].gateway == "XRP" %} Order {{ name }} was canceled because no XRP payment has been received {% endif %} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now