{"id":18728659,"url":"https://github.com/rubyonworld/ruby-paypal","last_synced_at":"2025-08-01T01:04:12.777Z","repository":{"id":174008101,"uuid":"542163786","full_name":"RubyOnWorld/ruby-paypal","owner":"RubyOnWorld","description":"It's critical that you understand how PayPal works and how the PayPal NVP API works.","archived":false,"fork":false,"pushed_at":"2022-09-28T00:51:20.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:32:28.408Z","etag":null,"topics":["api","nvp","paypal","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-27T15:42:03.000Z","updated_at":"2022-09-28T01:33:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"4309b053-0840-48f1-b387-c66e4a5f7702","html_url":"https://github.com/RubyOnWorld/ruby-paypal","commit_stats":null,"previous_names":["rubyonworld/ruby-paypal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/ruby-paypal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fruby-paypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fruby-paypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fruby-paypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fruby-paypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/ruby-paypal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fruby-paypal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268151818,"owners_count":24204034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","nvp","paypal","ruby"],"created_at":"2024-11-07T14:22:42.574Z","updated_at":"2025-08-01T01:04:12.760Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":["https://www.paypal.com/en_US/ebook/PP_NVPAPI_DeveloperGuide/index.html","https://developer.paypal.com/"],"categories":[],"sub_categories":[],"readme":"Ruby-PayPal\n===========\n\nA lightweight ruby wrapper for PayPal NVP APIs. To install type the following\nat the command line:\n\n$ gem install ruby-paypal\n\n\nTo use Ruby-PayPal\n==================\nIt's critical that you understand how PayPal works and how the PayPal NVP API\nworks. You should be relatively well-versed in the NVP API Developer Guide and \nReference (https://www.paypal.com/en_US/ebook/PP_NVPAPI_DeveloperGuide/index.html). \nYou should also visit and register yourself with the PayPal Developer Network\nand get a Sandbox account with in the PayPal Development Central\n(https://developer.paypal.com/). \n\nNote that this library only supports the API signature method of securing the API credentials.\n\nUsing the Ruby-PayPal library is relatively simple:\n\n1. For the Direct Payment using credit card payment, you need to use the\nDoDirectPayment APIs:\n\n\tusername = \u003cPayPal API username\u003e\n\tpassword = \u003cPayPal API password\u003e\n\tsignature = \u003cPayPal API signature\u003e\n\t\n\tipaddress = '192.168.1.1' # can be any IP address\n\tamount = '100.00' # amount paid\n\tcard_type = 'VISA' # can be Visa, Mastercard, Amex etc\n\tcard_no = '4512345678901234' # credit card number\n\texp_date = '022010' # expiry date of the credit card\n\tfirst_name = 'Sau Sheong'\n\tlast_name = 'Chang'\n\t\n    paypal = Paypal.new(username, password, signature) \n    response = paypal.do_direct_payment_sale(ipaddress, amount, card_type,\n\t\t\t   card_no, exp_date, first_name, last_name)\n\tif response.ack == 'Success' then\n\t  # do your thing\n\tend\n\t\nThe above code is for a final sale only.\n\nNote that the credit card number is checked against a modulo-10 algorithm (Luhn check) as well as a simple credit card\ntype check. For more information please refer to http://en.wikipedia.org/wiki/Luhn_algorithm and \nhttp://en.wikipedia.org/wiki/Credit_card_number\n\n2. For the Express Checkout using the customer's PayPal account for payment, you will need to use the ExpressCheckout APIs:\n\n\u003cto be documented\u003e\n\n\t","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fruby-paypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fruby-paypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fruby-paypal/lists"}